package com.hao.user.app.model.dto.user;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @author haoge
 * @version 1.0
 * @date 2023/5/21 20:41
 */
@Data
public class PhoneRequest {
    @NotBlank (message = "手机号不能为空")
    @NotNull (message = "手机号不能为空")
    @Length (min = 11,max = 11,message = "请输入正确的手机号")
    @Pattern (regexp = "1[3|4|5|7|8][0-9]\\d{8}",message = "手机号格式不对")
    private String phone;
}
